#pragma once

namespace gp
{
	class Parameter
	{
	public:

		typedef cr::DataBlock<sizeof(cr::Matrix4f)> DataBlock;

		template <typename T>
		void								Set(cr::HashedString hsName, cr::HashedString hsSemantic, gk::GpuProgramParameterType::Enum	type, T& v)
		{
			m_hsName = hsName;
			m_hsSemantic = hsSemantic;
			m_type = type;
			m_data.Assign(v);
		}
		
		cr::HashedString					GetName() const			{ return m_hsName; }
		cr::HashedString					GetSemantic() const		{ return m_hsSemantic; }
		gk::GpuProgramParameterType::Enum	GetType() const			{ return m_type; }
		DataBlock&							GetDatablock()			{ return m_data; }

	private:

		cr::HashedString					m_hsName;
		cr::HashedString					m_hsSemantic;
		gk::GpuProgramParameterType::Enum	m_type;
		DataBlock							m_data;
	};

	typedef cr::Handle<Parameter> ParameterHandle;
}